package IC.lir.operands;


/**
 * Memory operand
 */
public class MemOperand extends Operand {
	private final String id;

	/**
	 * Create a memory operand from a string identifier
	 * @param id the variable ID
	 */
	public MemOperand(String id) {
		this.id = id;
	}

	/**
	 * @return the name of the operand
	 */
	public String getName() {
		return id;
	}

	public String toString() {
		return id;
	}
	
	@Override
	public int getPrio() {
		return 2 << 10 + 1;
	}
	
	public int hashCode() {
		return id.hashCode() ^ getPrio();
	}
}
